import { ApiProperty } from '@nestjs/swagger'
import { IsNotEmpty, IsNumber, IsString } from 'class-validator'
import { IsNull } from 'typeorm'

export class CreateAccountDto {
  @ApiProperty({ example: '3000', description: '餐补' })
  @IsNumber({}, { message: '餐补必须为数字' })
  @IsNotEmpty({ message: '餐补不能为空' })
  lunchSalary: number
  @ApiProperty({ example: '3000', description: '交通补' })
  @IsNumber({}, { message: '交通补必须为数字' })
  @IsNotEmpty({ message: '交通补不能为空' })
  trafficSalary: number
  @ApiProperty({ example: '3000', description: '基本工资' })
  @IsNumber({}, { message: '基本工资必须为数字' })
  @IsNotEmpty({ message: '基本工资不能为空' })
  basisSalary: number
  @ApiProperty({ example: '3000', description: '总工资' })
  @IsNumber({}, { message: '总工资必须为数字' })
  @IsNotEmpty({ message: '总工资不能为空' })
  allSalary: number
  @ApiProperty({ example: '账套1', description: '账套名称' })
  @IsString({ message: '账套名称必须为字符串' })
  @IsNotEmpty({ message: '账套名称不能为空' })
  name: string
}
